print('1.多态:具有多种形态')
class Animal(object):
    def eat(self):
        print('动物吃饭···')

class Dog(Animal):
    def eat(self):
        print('狗吃骨头···')

class Cat(Animal):
    def eat(self):
        print('猫吃鱼···')
    def drink(self):
        print('猫喝水')

class Person:
    def eat(self):
        print('人啥都吃···')

#定义调用函数
def fun(obj):
    obj.eat()
def fur(obj):
    obj.drink()
#开始调用函数
fun(Cat())
fur(Cat())
fun(Dog())
fun(Animal())
fun(Person())
